# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=dnsa
pkgver=0.6
pkgrel=1
pkgdesc='A dns security swiss army knife.'
arch=('x86_64' 'aarch64')
url='http://packetfactory.openwall.net/projects/dnsa/index.html'
license=('GPL')
depends=('libnet' 'libpcap')
groups=('blackarch' 'blackarch-scanner')
source=("http://packetfactory.openwall.net/projects/$pkgname/$pkgname-ng-current.tar.gz")
sha512sums=('fac4d77d0c74786905eb6862064fad2deab0a6213f2dbb91daba367683e1cb69ac1eea9936adafc39983aa4d6dc3c61c3138b6a067209380dd648422a633d87f')

build() {
  cd "$pkgname-$pkgver-ng-beta1/sources"

  if [[ "$CARCH" == "x86_64" ]];
  then
    ./configure --prefix=/usr
  else
    ./configure --build=arm --prefix=/usr
  fi

  make
}

package() {
  cd "$pkgname-$pkgver-ng-beta1/sources"

  install -dm 755 "$pkgdir/usr/share/doc/$pkgname"

  make DESTDIR="$pkgdir" install

  cd ..
  cp -a docs/* "$pkgdir/usr/share/doc/$pkgname/"
}

